package com.mia.props.client.container;

import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class GuiHandler implements IGuiHandler {
   public static final int CHEST_ID = 0;
   public static final int TABLE_ID = 1;

   public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
      if (ID == 0) {
         return new ContainerChestProps(player.inventory, world.getTileEntity(x, y, z));
      } else {
         return ID == 1 ? new ContainerDecobench(player, world.getTileEntity(x, y, z)) : null;
      }
   }

   public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
      if (ID == 0) {
         return new GuiChestProps(new ContainerChestProps(player.inventory, world.getTileEntity(x, y, z)), player.inventory, world.getTileEntity(x, y, z));
      } else {
         return ID == 1 ? new GuiDecobench(new ContainerDecobench(player, world.getTileEntity(x, y, z))) : null;
      }
   }
}
